<?php

class Default_Bootstrap extends Zend_Application_Module_Bootstrap {

    protected $_name = 'services';
    
    public function _initRouter() {
        $front_controller = Zend_Controller_Front::getInstance();
        $router = $front_controller->getRouter();
        $route = new Zend_Controller_Router_Route_Regex (
            'service/([^.]*).html',
            array (
                'controller' => 'service'
            ),
            array (
                1 => 'action'
            )
        );
        $router->addRoute("services", $route);
    }
    
    public function _initAcl() {
        $acl = Zend_Registry::get("acl");
        $acl->addResource("$this->_name:index");
        $acl->allow(Core_Role::ROLE_INPUT, "{$this->_name}:index", array(
            'new',
            'getbuoys',
            'delete-temp-transaction',
            'plupload',
            'delete-upload-file',
            'update',
            'delete-update-dunnage-operation',
            'more-update-dunnage'
        ));
        $acl->allow(Core_Role::ROLE_GUEST, "{$this->_name}:index", array(
            'index',
            'cargo',
            'dunnage',
            'tally'
        ));
        Zend_Registry::set("acl", $acl);
    }

}

?>
